val lines=sc.textFile("file:///home/ubuntu1/spark/work6//chapter5-data1.txt")
val words=lines.filter(_.split(",")(1)=="DataBase")
//words.foreach(println)
val rdd=words.map(x=>(x.split(",")(1),1))
val accum=sc.longAccumulator("My Accumulator")
rdd.values.foreach(x=>accum.add(x))
accum.value

